package world;

import java.io.Serializable;

import utility.Vector;

public abstract class PhysicalObject implements Serializable {

	private static final long serialVersionUID = 1455429616127869340L;
	protected Vector position;
	protected String name;
	protected Person owner;

	public PhysicalObject(Vector startingPosition) {
		position = startingPosition;
		name = null;
		owner = null;
	}

	public Vector getPosition() {
		return position;
	}

	public void setPosition(Vector v) {
		position = v;
	}
	

	public Person getOwner() {
		return owner;
	}

	public void setOwner(Person owner) {
		this.owner = owner;
	}

	public String getName() {
		if (name == null) {
			return "<null>";
		} else {
			return name;
		}
	}

	@Override
	public String toString() {
		return getName();
	}

}
